import React, { memo, useCallback, useEffect, useMemo, useState } from 'react'
import { loadZipAnimation } from '../../utils/util'
import { useDeepCompareLayoutEffect, useMount } from 'ahooks'

const GiftShow = memo((props) => {
  // useMount(() => {
  //     console.log('update', props);
  // })
  useDeepCompareLayoutEffect(() => {
    console.log('update', props)
  }, [{}])
  // const { url } = useMemo(() => ({ url: props.url }), [])
  // const { url } = useCallback(() => {
  //     console.log('update', props);
  //     return props
  // }, [])()

  // const [imgUrl, setImgUrl] = useState(url);

  // const showLottie
  useEffect(() => {
    // console.log(url);
    // setImgUrl(url)
    // if (url.includes('zip') && !isRender) {
    //     setIsRender(true)
    console.log('几次？')
    //     loadZipAnimation(url, 'gift_show')
    // }
  }, [])

  return (
    <div className="gift" id="gift_show">
      {/* <img src={url} alt="" /> */}
    </div>
  )
})

export default GiftShow
